<script src="/static/common/js/sms-list.js" type="text/javascript"></script>
<link rel="stylesheet" href="/static/common/css/page.css">
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<section class="content" id="table">
    <div class="row">
        <div class="col-xs-12">
            <div class="nav-tabs-custom">
                <ul class="nav nav-tabs pull-right">
                    <li class="pull-left header"><i class="fa fa-bars"></i>
                        <small>短信列表</small>
                    </li>
                </ul>
                <div class="tab-content">
                    <div class="tab-pane active" id="tab-content-list">
                        <div class="box">
                            <div class="dataTables_filter" id="searchDiv">
                                <input type="hidden" th:value="${collectId}" id="collectId">
                                <div class="input-append date form_datetime btn-group pull-left">
                                    <span>开始日期:</span>
                                    <input size="18" type="text" value="" readonly id="start_time"
                                           th:value="${startTime}">
                                    <span class="add-on"><i class="icon-th"></i></span>
                                </div>
                                <div class="pull-left" style="width: 2%">&nbsp;</div>
                                <div class="input-append date form_datetime btn-group pull-left">
                                    <span>结束日期:</span>
                                    <input size="18" type="text" value="" readonly id="end_time" th:value="${endTime}">
                                    <span class="add-on"><i class="icon-th"></i></span>
                                </div>
                                <div class="pull-left" style="width: 2%" th:if="${user.role=='admin'}">&nbsp;</div>
                                <div class="btn-group pull-left" th:if="${user.role=='admin'}">
                                    <span>账户:</span>
                                    <input type="text" size="20" placeholder="输入用户账号" id="search_name"
                                           th:value="${searchName}">
                                </div>
                                <div class="pull-left" style="width: 2%">&nbsp;</div>
                                <div class="btn-group pull-left">
                                    <span>手机号:</span>
                                    <input type="text" size="20" placeholder="输入手机号" id="search_phone"
                                           th:value="${searchPhone}">
                                </div>
                                <div class="btn-group pull-right">
                                    <button type="button" class="btn btn-info" id="sms_query_click">
                                        <i class="fa fa-search"></i>查询
                                    </button>
                                    <button type="button" class="btn btn-default" id="sms_reset_click">
                                        <i class="fa fa-refresh"></i>重置
                                    </button>
                                    <button class="btn btn-primary" id="sms_export">
                                        <i class="fa fa-clipboard"></i>导出
                                    </button>
                                </div>
                            </div>
                            <div class="box-body">
                                <div id="data-table_wrapper"
                                     class="dataTables_wrapper form-inline dt-bootstrap no-footer">
                                    <div id="data-table_processing" class="dataTables_processing"
                                         style="display: none;">处理中...
                                    </div>
                                    <table id="data-table"
                                           class="table table-bordered table-striped table-hover dataTable no-footer responsive dtr-inline collapsed"
                                           style="width: 100%;" role="grid" aria-describedby="data-table_info">
                                        <thead>
                                        <tr role="row">
                                            <th class="text-center sorting_disabled" rowspan="1" colspan="1"
                                                style="width: 10%;" aria-label="序号">序号
                                            </th>
                                            <th class="sorting_disabled text-center" rowspan="1" colspan="1"
                                                style="width: 10%;" aria-label="状态">状态
                                            </th>
                                            <th class="sorting_disabled text-center" rowspan="1" colspan="1"
                                                style="width: 15%;" aria-label="手机号码">手机号码
                                            </th>
                                            <th class="sorting_disabled text-center" rowspan="1" colspan="1"
                                                style="width: 45%;" aria-label="短信内容">短信内容
                                            </th>
                                            <th class="sorting_disabled text-center" rowspan="1" colspan="1"
                                                style="width: 20%;" aria-label="发送时间">发送时间
                                            </th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr class="odd" th:if="${smsDetailsList!=null && smsDetailsList.size()>0}"
                                            th:each="item,index:${smsDetailsList}">
                                            <td class="text-center sorting_disabled" rowspan="1" colspan="1"
                                                style="width: 15%;" th:text="${index.count}">
                                            </td>
                                            <td class="sorting_disabled text-center" rowspan="1" colspan="1"
                                                style="width: 10%;"
                                                th:text="${item.status == -1 ? '发送失败' : (item.status == 10 ? '发送成功' : (item.status == 3 ? '发送中2' : '发送中')) }">
                                            </td>
                                            <td class="sorting_disabled text-center" rowspan="1" colspan="1"
                                                style="width: 15%;" th:text="${item.phone}">
                                            </td>
                                            <td class="sorting_disabled text-center" rowspan="1" colspan="1"
                                                style="width: 40%;" th:text="${item.contents}">
                                            </td>
                                            <td class="sorting_disabled text-center" rowspan="1" colspan="1"
                                                style="width: 20%;"
                                                th:text="${#dates.format(item.createTime,'yyyy-MM-dd HH:mm:ss')}">
                                            </td>
                                        </tr>
                                        <tr class="odd" th:if="${smsDetailsList==null || smsDetailsList.size()<1}">
                                            <td valign="top" colspan="8" class="dataTables_empty">未找到符合条件的数据</td>
                                        </tr>
                                        </tbody>
                                    </table>
                                    <div>共 <span th:text="${count}"></span> 条</div>
                                    <input type="hidden" th:value="${current}" name="current">
                                    <input type="hidden" th:value="${pageCount}" name="pageCount">
                                    <div class="information_page"></div>
                                </div>
                            </div>
                            <!-- /.box-body -->
                        </div>
                        <!-- /.box -->
                    </div>
                </div>
                <!-- /.tab-content -->
            </div>
            <!-- nav-tabs-task -->
        </div>
        <!-- /.col -->
    </div>
    <!-- /.row -->
</section>